# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=gtkgreet
pkgver=0.7_git20210325
_gitrev=3471aaaaee4619fd4aded85803b27b4a8dff41a6
pkgrel=0
pkgdesc="GTK based greeter for greetd"
url="https://git.sr.ht/~kennylevinsen/gtkgreet"
arch="aarch64 armhf armv7 ppc64le x86 x86_64"  # limited by greetd <- rust/cargo
license="GPL-3.0"
depends="greetd"
makedepends="
	gtk+3.0-dev
	gtk-layer-shell-dev
	json-c-dev
	meson
	scdoc
	"
subpackages="$pkgname-doc"
source="$pkgname-$_gitrev.tar.gz::https://git.sr.ht/~kennylevinsen/gtkgreet/archive/$_gitrev.tar.gz"
builddir="$srcdir/$pkgname-$_gitrev"

build() {
	abuild-meson \
		-Dlayershell=enabled \
		-Dman-pages=enabled \
		. output
	meson compile ${JOBS:+-j ${JOBS}} -C output
}

check() {
	meson test --no-rebuild -v -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
aecf9c6068f612a294a81403fca1abf150e281f6d965d2f76ff3140eec7f6014354329e8242d344d47a340d84b488c1f2069592fb9662f00add072bb4beb97b0  gtkgreet-3471aaaaee4619fd4aded85803b27b4a8dff41a6.tar.gz
"
